package com.atguigu.gulimall.ware.service;

import com.atguigu.common.to.OrderTo;
import com.atguigu.gulimall.ware.to.StockLockedTo;
import com.atguigu.gulimall.ware.vo.OrderLockVo;
import com.atguigu.gulimall.ware.vo.SkuStockVo;
import com.baomidou.mybatisplus.extension.service.IService;
import com.atguigu.common.utils.PageUtils;
import com.atguigu.gulimall.ware.entity.WareSkuEntity;

import java.util.List;
import java.util.Map;

/**
 * 商品库存
 *
 * @author zhangbs
 * @email 18201064863@163.com
 * @date 2024-02-08 00:32:00
 */
public interface WareSkuService extends IService<WareSkuEntity> {

    PageUtils queryPage(Map<String, Object> params);

    void addStock(String skuName, Long skuId, Long wareId, Integer skuNum);

    List<SkuStockVo> queryStock(List<Long> skuIds);

    Boolean lockOrderStock(OrderLockVo orderLockVo);

    void unlockStock(StockLockedTo stockLockedTo);

    void releaseWare(OrderTo order);
}

